﻿CREATE TABLE [dbo].[Insumo] (
    [IdParte]   INT                 NOT NULL,
    [Jerarquia] [sys].[hierarchyid] NOT NULL,
    [Nivel]     AS                  ([Jerarquia].[GetLevel]()),
    [Cantidad]  INT                 NULL,
    CONSTRAINT [PK_Insumo] PRIMARY KEY CLUSTERED ([IdParte] ASC),
    CONSTRAINT [FK_Insumo_Parte] FOREIGN KEY ([IdParte]) REFERENCES [dbo].[Parte] ([IdParte])
);





